using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CMS.Domain.Entity;
using CMS.Infrastructrue.Persistence.Configuration.Base;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace CMS.Infrastructrue.Persistence.Configuration
{
    public class RegisterConfiguration:BaseEntityConfiguration<Register>
    {
        /// <summary>
        /// 注册表
        /// </summary>
        /// <param name="builder"></param>
        public override void Configure(EntityTypeBuilder<Register> builder)
        {
            base.Configure(builder);
             builder.ToTable("register");
             
             builder.Property(x=>x.Email).HasColumnName("email").HasMaxLength(2000).HasColumnOrder(1);
             builder.Property(x=>x.AuthCode).HasColumnName("auth_code").HasMaxLength(2000).HasColumnOrder(2);
        }


        // public string Email {get;set;}=null!;
        // public string AuthCode {get;set;}=null!;
        // builder.Property(x => x.Parameters).HasColumnName("parameters").HasMaxLength(2000).HasColumnOrder(1);
    }
}